package me.zhengjie.modules.file.util;

import java.util.Random;

public class IdUtils {
    private static final String CHARACTERS = "abcdefghijklmnopqrstuvwxyz0123456789";
    
    public static String generateRandomId(int length) {
        StringBuilder sb = new StringBuilder();
        Random random = new Random();
        for (int i = 0; i < length; i++) {
            sb.append(CHARACTERS.charAt(random.nextInt(CHARACTERS.length())));
        }
        return sb.toString();
    }
}